Skip to content

fix(serverless): log debug path from the HTTP request - #93

Open
Ryank90 wants to merge 1 commit into
fix/env-redact-stackfrom
fix/log-request-path
Open

fix(serverless): log debug path from the HTTP request#93
Ryank90 wants to merge 1 commit into
fix/env-redact-stackfrom
fix/log-request-path

Conversation

@Ryank90

@Ryank90 Ryank90 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • --debug path/status now come from the generated client's HTTPResponse (Request.URL.Path) instead of duplicated OpenAPI path literals in each wrapper.
  • Addresses the nit on feat(builds): implement builds list and show methods #86 without rebasing the builds PR or the rest of the stack.
  • Stacked on fix/env-redact-stack so logResponse already exists.

Test plan

  • go test -race ./internal/api/serverless/
  • make lint
  • Confirm --debug still prints the request path after a list/show call

Made with Cursor

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include coderabbit-review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b2dae64-23d5-4e9b-b263-f4c194bb7d96

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates serverless client debug logging so the request path and status are derived from the generated OpenAPI client’s HTTPResponse (specifically Request.URL.Path), removing duplicated hard-coded path literals across wrapper methods and keeping debug output aligned with future OpenAPI regenerations.

Changes:

  • Refactors logResponse to accept *http.Response and derive (path, status) via a helper.
  • Updates serverless wrapper methods to pass resp.HTTPResponse into logResponse.
  • Adds unit tests to validate path/status extraction behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/api/serverless/log.go Changes logResponse signature to take *http.Response and adds responsePathStatus helper.
internal/api/serverless/log_test.go Updates existing logging test and adds coverage for responsePathStatus.
internal/api/serverless/client.go Switches debug logging calls to use resp.HTTPResponse instead of hard-coded paths.
internal/api/serverless/env.go Switches debug logging calls to use resp.HTTPResponse instead of hard-coded paths.
internal/api/serverless/secrets.go Switches debug logging calls to use resp.HTTPResponse instead of hard-coded paths (still nil body).

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Duplicated OpenAPI path literals in wrappers would drift on a deployments/apps rename. Take path and status from the generated client's HTTPResponse instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Ryank90
Ryank90 force-pushed the fix/log-request-path branch from df86dda to f4af5ec Compare August 18, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants